package com.zy.spring01;

import com.zy.domain.Person;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class springTest1
{
    @Test
    public void test1()
    {
        ClassPathXmlApplicationContext applicationContext= new ClassPathXmlApplicationContext("applicationContext.xml");
        Person person=applicationContext.getBean("person",Person.class);
        System.out.println(person);
    }
    @Test
    public void test2()
    {
        ClassPathXmlApplicationContext applicationContext= new ClassPathXmlApplicationContext("applicationContext.xml");
        System.out.println("之前");
        applicationContext.close();
        System.out.println("之后");
    }
}
